<template>
	<view>
		<empty text="暂无浏览历史" v-if="Object.keys(info).length == 0"></empty>
		<view v-for="(val,k) in info" :key='k'>
			<view class="bg ptb-20 plr-36">
				{{k}}
			</view>
			<historyItem v-for="(item, key) in val" :item="item" :key='key'></historyItem>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{}
			};
		},
		onLoad() {
			this.init()
		},
		methods:{
			init(){
				this.$http('/api/user/user_history').then(data=>{
					this.info = data
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
